﻿<Page
    x:Class="SocketsGame.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SocketsGame"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!-- Back button and page title -->
        <Grid>
            <TextBlock x:Name="pageTitle" Text="Sockets Game" Style="{StaticResource HeaderTextBlockStyle}" 
                       VerticalAlignment="Bottom"
                       Margin="30,0,30,40"
                       IsHitTestVisible="false"/>
        </Grid>
        <Grid Grid.Row="1" Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="Auto"/>                
            </Grid.RowDefinitions>
            <Grid Grid.Row="0" Margin="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Text="Server Console" Style="{StaticResource SubheaderTextBlockStyle}" Margin="3"/>
                <ScrollViewer x:Name="ServerConsole" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
                    <TextBlock x:Name="ConsoleText" Text="Console initializing..." Style="{StaticResource BaseTextBlockStyle}" TextWrapping="Wrap"></TextBlock>
                </ScrollViewer>
            </Grid>
            <Grid Grid.Row="1" Margin="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Text="Client Console" Style="{StaticResource SubheaderTextBlockStyle}" Margin="3"/>
                <ScrollViewer x:Name="GameConsole" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
                    <TextBlock x:Name="GameText" Text="Welcome to the sockets game!" Style="{StaticResource BaseTextBlockStyle}" TextWrapping="Wrap"></TextBlock>
                </ScrollViewer>
            </Grid>
            <Grid Grid.Row="2" HorizontalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBox x:Name="Command"/>
                <Button Content="Go" Grid.Column="1" Click="Go_OnClick"/>
            </Grid>
        </Grid>
    </Grid>
</Page>
